
#ifndef MATH_UTILS_H
#define MATH_UTILS_H
#include "image.h"

#ifndef ABS
#define ABS(x) ((x) > 0 ? (x) : -(x))
#endif

#ifndef MIN
#define MIN(a, b) ((a) > (b) ? (b) : (a))
#endif

#ifndef MAX
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif

inline float square(float data) { return data * data; }

float least_sq(pii *, int);
int dis(int, int, int, int);
float variance(float *data, int n);
float average(float *data, int n);

#endif // MATH_UTILS_H
